<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<div class="container-fluid">
	<div class="row">
		<div class="col-sm-offset-1 col-md-6">
			<h4>Données générales de l'établissement</h4>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-offset-1 col-md-6">
		<form:form role="form" action="etablissement.save" method="post" modelAttribute="etablissement" cssClass="form-horizontal">
			
			<form:hidden path="id"/>
			
			<div class="form-group">
				<label for="uai" class="col-sm-2 control-label">N°UAI:</label>
				<div class="col-sm-10">
					<form:input path="uai" placeholder="UAI" required="true" class="form-control" value="${etablissement.uai}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="nom" class="col-sm-2 control-label">Nom:</label>
				<div class="col-sm-10">
					<form:input path="nom" placeholder="Nom" required="true" class="form-control" value="${etablissement.nom}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="adresse1" class="col-sm-2 control-label">Adresse:</label>
				<div class="col-sm-10">
					<form:input path="adresse1" class="form-control" value="${etablissement.adresse1}"/>
					<br/>
					<form:input path="adresse2" class="form-control" value="${etablissement.adresse2}"/>
					<br/>
					<form:input path="adresse3" class="form-control" value="${etablissement.adresse3}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="codePostal" class="col-sm-2 control-label">Code postal:</label>
				<div class="col-sm-10">
					<form:input path="codePostal" class="form-control" value="${etablissement.codePostal}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="boitePostale" class="col-sm-2 control-label">Boite postale:</label>
				<div class="col-sm-10">
					<form:input path="boitePostale" class="form-control" value="${etablissement.boitePostale}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="commune" class="col-sm-2 control-label">Commune:</label>
				<div class="col-sm-10">
					<form:input path="commune" class="form-control" value="${etablissement.commune}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="telephone" class="col-sm-2 control-label">Téléphone:</label>
				<div class="col-sm-10">
					<form:input path="telephone" class="form-control" value="${etablissement.telephone}"/>
				</div>
			</div>
			
			<div class="form-group">
				<label for="email" class="col-sm-2 control-label">E-mail:</label>
				<div class="col-sm-10">
					<form:input path="email" class="form-control" value="${etablissement.email}"/>
				</div>
			</div>
			<%--
			<div class="form-group">
				<label for="departement" class="col-sm-2 control-label">Département:</label>
				<div class="col-sm-10">
					<form:select path="departement" items="${departements}" itemValue="id" itemLabel="libelleLong"/>
				</div>
			</div>
			 --%>
			<div class="form-group">
				<label for="email" class="col-sm-2 control-label">Département:</label>
				<div class="col-sm-10">
					<form:select path="departement" items="${departements}" cssClass="form-control" itemLabel="libelleLong"/>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-md-offset-5">
					<input type="submit" class="btn btn-primary btn-sm" value="Enregistrer les modifications"/>
				</div>
			</div>
			
		</form:form>
		</div>
	</div>
</div>